﻿using System.ComponentModel;

namespace TravellingEntrepreneur
{
    /// <summary>
    /// Class for holding the program and description for a particular region
    /// </summary>
    public class RegionPrograms
    {
        private string _state;
        private string _agency;
        private string _description;
        public event PropertyChangedEventHandler PropertyChanged;

        public RegionPrograms()
        {
        }

        public string State
        {
            get { return _state; }
            set
            {
                if (value != _state)
                {
                    this._state = value;
                    NotifyPropertyChanged("State");
                }
            }
        }

        public string Agency
        {
            get { return _agency; }
            set
            {
                if (value != _agency)
                {
                    this._agency = value;
                    NotifyPropertyChanged("Agency");
                }
            }
        }

        public string Description
        {
            get { return _description; }
            set
            {
                if (value != _description)
                {
                    this._description = value;
                    NotifyPropertyChanged("Description");
                }
            }
        }

        private void NotifyPropertyChanged(string property)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(property));
            }
        }

    }
}